using System.Windows.Forms;
namespace Scripni.EditPathVariable.UI.Services
{
    /// <summary>
    /// UI implementation of the dialog service.
    /// </summary>
    public class UiDialogService : IDialogService
    {
        /// <summary>
        /// <see cref="IDialogService.DisplayAboutBox"/>
        /// </summary>
        public void DisplayAboutBox()
        {
            AboutEditPathVariable aboutBox = new AboutEditPathVariable();
            aboutBox.ShowDialog();
        }

        /// <summary>
        /// <see cref="IDialogService.ConfirmAction"/>
        /// </summary>
        /// <param name="title"></param>
        /// <param name="errorMessage"></param>
        public bool ConfirmAction(string title, string errorMessage)
        {
            return MessageBox.Show(errorMessage, title, MessageBoxButtons.YesNo) == DialogResult.Yes;
        }
    }
}